//
//  AppDelegate.swift
//  swiftProductTemplate
//
//  Created by 刘圣洁 on 2025/6/18.
//

import UIKit
import SHFullscreenPopGestureSwift

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        // 设置根视图控制器
        setupRootViewController()
        
        //导航栏控制
        configFullscreenPopGesture()
        
        return true
    }
    
}

extension AppDelegate {
    private func setupRootViewController() {
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.backgroundColor = .systemBackground
        
        // 初始视图控制器
        window?.rootViewController = MainTabBarController()
        window?.makeKeyAndVisible()
    }
    
    //导航栏控制
    private func configFullscreenPopGesture() {
        SHFullscreenPopGesture.configure()
    }
}
